﻿using System.Drawing;

namespace EasyLottery.Utils
{
    class LocationUtils
    {
        /// <summary>
        /// 获取中间位置
        /// </summary>
        /// <param name="sizeOfApp"></param>
        /// <param name="locationOfObject"></param>
        /// <param name="sizeOfOject"></param>
        /// <returns></returns>
        public static Point GetMiddleLocation(Size sizeOfApp, Point locationOfObject, Size sizeOfOject)
        {
            var x = (sizeOfApp.Width - sizeOfOject.Width) / 2;
            return new Point(x, locationOfObject.Y);
        }
    }
}
